{{extend "layout.html"}}
{{block menu}}
{{include "menu.html"}}
{{menu('group')}}
{{end}}

{{block content}}
<div class="row">
{{if has_permission('GroupCreate', request.user):}}
<a href="/group/create" class="green more-link">Create Group</a>
{{pass}}
<div class="clear"></div>
{{for g in groups:}}
<div class="corner top_blank_small clearfix" style="background-color:#f1f6ce;position:relative">
    <a href="/group/{{=g.name}}"><img src="{{=g.get_icon_url()}}" style="margin:4px 30px 4px 4px" class="left"/></a>
    <div style="margin:20px; padding:10px;">
    <h3>
    {{=g.caption}}
    </h3>
    <div>Created at: {{=g.create_time.strftime("%Y-%m-%d")}}</div>
    <div>
        {{=g.description}}
    </div>
    <div style="position:absolute;left:180px;bottom:3px;">
    <a class="more-link red" href="/group/{{=g.name}}">Enter</a>
    </div>
    </div>
</div>
<div class="clear"></div>
{{pass}}
</div>
<div class="clear"></div>
{{end}}